﻿@model IEnumerable<BookShopWeb.Models.DB.IndexBooks>

@{
    ViewData["Title"] = "Home Page";
}
<div class="newBooks">
    <span class="blockName w-600">
        Новинки
    </span>

    <div class="books">
        @foreach (var item in Model)
        {
            <div class="book">
                <img class="bookImg" src="~/img/@Html.DisplayFor(modelItem => item.NewBooks.Photo)" />
                <div class="bookText">
                    <p class="bookName">
                        @Html.DisplayFor(modelItem => item.NewBooks.Title)
                    </p>
                    <p class="bookWriter w-400">@Html.DisplayFor(modelItem => item.NewBooks.Name)</p>
                </div>
                <div class="bottomItems">
                    <span class="price w-700">@Html.DisplayFor(modelItem => item.NewBooks.Price) ₽</span>
                    <button class="buyBtn">Купить</button>
                </div>
            </div>
        }
    </div>


</div>
<div class="salesHits">
    <span class="blockName w-600 white">
        Хиты продаж
    </span>
    <div class="books">
        @foreach (var item in Model)
        {
            <div class="book">
                <img class="bookImg" src="~/img/@Html.DisplayFor(modelItem => item.SalesHitsBooks.Photo)" />
                <div class="bookText">
                    <p class="bookName">@Html.DisplayFor(modelItem => item.SalesHitsBooks.Title)</p>
                    <p class="bookWriter w-400">@Html.DisplayFor(modelItem => item.SalesHitsBooks.Name)</p>
                </div>
                <div class="bottomItems">
                    <span class="price w-700">@Html.DisplayFor(modelItem => item.SalesHitsBooks.Price) ₽</span>
                    <button class="buyBtn">Купить</button>
                </div>
            </div>
        }
    </div>
</div>